Rect

public final static Rect Rect(Integer x, Integer y, Integer width, Integer height)
public final static Rect Rect(Integer x, Integer y, Integer width, Integer height)

Creates a new instance of Rect with the given parameters.

Since

8.0.0

Parameters

x

The horizontal coordinate of the upper-left corner of the rectangle.

y

The vertical coordinate of the upper-left corner of the rectangle.

width

The width of the rectangle.

height

The height of the rectangle.

Throws

if width or height is negative.


public final static Rect Rect(Point origin, Size size)
public final static Rect Rect(Point origin, Size size)

Creates a new instance of Rect with the given origin and size.

Since

8.0.0

Parameters

origin

The upper-left corner of the rectangle.

size

The size of the rectangle.